﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class SalidadFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As SalidadBE
        Dim tmpSalidad As SalidadBE = New SalidadBE()
        Try
            With tmpSalidad
                .Decimales = convertDTFromDb.ConvertShort(dr.Item("Decimales"))
                .FCancela = convertDTFromDb.convertDateTime(dr.Item("FCancela"))
                .Fecha = convertDTFromDb.convertDateTime(dr.Item("Fecha"))
                .IdCaja = convertDTFromDb.ConvertShort(dr.Item("IdCaja"))
                .IdCorte = convertDTFromDb.convertInt32(dr.Item("IdCorte"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .IdSalida = convertDTFromDb.convertInt32(dr.Item("IdSalida"))
                .Importe = convertDTFromDb.ConvertDecimal(dr.Item("Importe"))
                .Motivo = convertDTFromDb.ConvertString(dr.Item("Motivo"))
                .Status = convertDTFromDb.ConvertString(dr.Item("Status"))
                .Usr = convertDTFromDb.ConvertString(dr.Item("Usr"))
                .UsrCancela = convertDTFromDb.ConvertString(dr.Item("UsrCancela"))
            End With
            Return tmpSalidad
        Catch ex As Exception
            Throw
        Finally
            tmpSalidad = Nothing
        End Try
    End Function
End Class
